import { createApp } from "vue";
import pinia from "./stores";
import ElementPlus from "element-plus";
import zhCn from "element-plus/es/locale/lang/zh-cn";
import "element-plus/dist/index.css";
import App from "./App.vue";
import router from "./router";
import "./styles/index.scss";
import ElSvg from "./components/SvgIcon/ElSvg";
// 引入了路由导航守卫
import "./permission";
import registerPermissionDirective from "./directives/permission";

const app = createApp(App);

ElSvg(app);

app.use(pinia);
app.use(router);
app.use(ElementPlus, {
  locale: zhCn,
});

// 注册指令
registerPermissionDirective(app);

app.mount("#app");
